package com.icim.whtm.dao;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.icim.whtm.entity.Ct_PpboxProductSum;


@Repository
public class Ct_PpboxProductSumDao {

	@Resource
    private JdbcTemplate whtmJdbcTemplate;

    public void save(Ct_PpboxProductSum box) {
    	String sql = "INSERT INTO T1FEMADM.CT_PPBOXPRODUCTSUM(timekey,boxname,boxstate,location,"
                + "ppboxid,glsqty,lotname,productrequestname,productspecname,lasteventname,lasteventtime,"
                + "lasteventuser,lasteventcomment,receiveflag) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
    	whtmJdbcTemplate.update(sql, new Object[] { box.getTimekey(),box.getBoxname(),box.getBoxstate(),box.getLocation(),
        		box.getPpboxid(),box.getGlsqty(),box.getLotname(),box.getProductrequestname(),box.getProductspecname(),
        		box.getLasteventname(),box.getLasteventtime(),box.getLasteventuser(),box.getLasteventcomment(),box.getReceiveflag()});
    }
}
